package com.eway.esb.service.rest;

import java.util.List;

//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;

import com.xiebing.soa.util.StringUtils;

public class RestServiceSupport {
	
//	protected final Logger logger = LoggerFactory.getLogger(getClass());
	
	
	
	public RestServiceSupport(){
		
	}
	
	/**
	 * 根据时间段以及医生策略算出时间段的可预约人数
	 * @param startTime
	 * @param endTime
	 * @param docRule
	 * Sep 28, 2009
	 */
	public int countNum(String startTime,String endTime,String docRule){
		List<String> list=StringUtils.String2Set(docRule, "-");
		int num=list.size();
		int start=Integer.parseInt(startTime.substring(0, 2));
		int end=Integer.parseInt(endTime.substring(0, 2));
		return (end-start)*num;
		
	}

}
